#include  "hal.h"
#include  "mid_power.h"
#include  "mid_bus.h"
#include  "app.h"


void mid_PowerPort(void)
    {	

		stc_gpio_cfg_t stcGpioCfg;
		Sysctrl_SetPeripheralGate(SysctrlPeripheralGpio, TRUE);
    stcGpioCfg.enDir = GpioDirOut;
    stcGpioCfg.enDrv = GpioDrvH;
    stcGpioCfg.enPu = GpioPuEnable;
    stcGpioCfg.enPd = GpioPdDisable;
    stcGpioCfg.enOD = GpioOdDisable;
    stcGpioCfg.enCtrlMode = GpioAHB;
    Gpio_Init(GpioPortF, GpioPin7, &stcGpioCfg); 			
		hal_gpio_set_out(GpioPortF, GpioPin7);			
			

			power_on();
			
			
    stcGpioCfg.enDir = GpioDirIn;
    stcGpioCfg.enDrv = GpioDrvL;
    stcGpioCfg.enPu = GpioPuEnable;
    stcGpioCfg.enPd = GpioPdDisable;
    stcGpioCfg.enOD = GpioOdDisable;
    stcGpioCfg.enCtrlMode = GpioAHB;
    Gpio_Init(GpioPortF, GpioPin4, &stcGpioCfg); 			
  	hal_gpio_set_in(GpioPortF, GpioPin4);
			 Shutdown_time = 120;
			 START=1;
		}
